﻿@model BlogAppExt.Models.PostDetailVM

<div class="row">
    <div class="well">
        <h4>@Model.Post.Title</h4>
        <h5>@Model.User.NameFirst @Model.User.NameLast</h5>
        <p>@Model.Post.Text</p>
    </div>
</div>

<div class="row">
    <div class="well-sm well">

        <form class="form-group" method="post">
            <input class="form-control" type="text" name="userName" placeholder="User Name" />
            <textarea class="form-control" rows="10" name="text"></textarea>
            <input hidden type="text"name="postId" value="@Model.Post.Id" />
            <input class="form-control btn btn-success" type="submit" value="Post It" />
        </form>
    </div>
</div>

<div class="row">
    <table class="table table-hover">
        @foreach (var comment in Model.Comments)
        {
            <tr>
                <td>@comment.UserName</td>
                <td>@comment.Text</td>
            </tr>
        }


    </table>

</div>